<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">



  
  
    
    
  <script src="/lib/pace/pace.min.js?v=1.0.2"></script>
  <link href="/lib/pace/pace-theme-fill-left.min.css?v=1.0.2" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="论文研究," />





  <link rel="alternate" href="/atom.xml" title="我的笔记本" type="application/atom+xml" />






<meta name="description" content="导读本教程主要参考来自B站的【人工智能教程】5.4 - 证据理论视频，在这之上还加入了其他的博客、论文以及针对个人研究方向的见解。">
<meta property="og:type" content="article">
<meta property="og:title" content="证据理论：真相永远只有一个">
<meta property="og:url" content="https://sakebow.github.io/2020/11/01/%E7%94%B5%E7%BD%91%E7%A0%94%E7%A9%B6/%E8%AF%81%E6%8D%AE%E7%90%86%E8%AE%BA%EF%BC%9A%E7%9C%9F%E7%9B%B8%E6%B0%B8%E8%BF%9C%E5%8F%AA%E6%9C%89%E4%B8%80%E4%B8%AA/index.html">
<meta property="og:site_name" content="我的笔记本">
<meta property="og:description" content="导读本教程主要参考来自B站的【人工智能教程】5.4 - 证据理论视频，在这之上还加入了其他的博客、论文以及针对个人研究方向的见解。">
<meta property="article:published_time" content="2020-11-01T03:32:00.000Z">
<meta property="article:modified_time" content="2020-11-01T03:54:20.265Z">
<meta property="article:author" content="sakebow">
<meta property="article:tag" content="论文研究">
<meta name="twitter:card" content="summary">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":true,"scrollpercent":true,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://sakebow.github.io/2020/11/01/电网研究/证据理论：真相永远只有一个/"/>



<meta name="google-site-verification" content="gmKmVpWaqN85ipDFNNCd2AweYJjcTFrVxCKCy36wueo" />
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?1d2c90caa02c073d8ebaa116ab3027fb";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>


  <title>证据理论：真相永远只有一个 | 我的笔记本</title>
  








  
  <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
  <script type="text/javascript" src="/js/src/custom.js"></script>
  
<meta name="generator" content="Hexo 4.2.1"></head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>
	
	<a href="https://github.com/sakebow" target="_blank" rel="noopener" class="github-corner" aria-label="View source on GitHub">
	  <svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"
	    style="fill:#64CEAA; color:#fff; position: fixed; top: 0; border: 0; right: 0; z-index: 999;">
	    <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
		<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
		  fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
		<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
		  fill="currentColor" class="octo-body"></path>
	  </svg>
	</a>
	<style>
	  .github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}
	  @keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}
	  @media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}
	</style>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">我的笔记本</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">一只干什么都会失败但是很不想放弃的科研狗</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off"
             placeholder="搜索..." spellcheck="false"
             type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://sakebow.github.io/2020/11/01/%E7%94%B5%E7%BD%91%E7%A0%94%E7%A9%B6/%E8%AF%81%E6%8D%AE%E7%90%86%E8%AE%BA%EF%BC%9A%E7%9C%9F%E7%9B%B8%E6%B0%B8%E8%BF%9C%E5%8F%AA%E6%9C%89%E4%B8%80%E4%B8%AA/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="sakebow">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/icon/UN.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="我的笔记本">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">证据理论：真相永远只有一个</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2020-11-01T11:32:00+08:00">
                2020-11-01
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/" itemprop="url" rel="index">
                    <span itemprop="name">人工智能</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/2020/11/01/%E7%94%B5%E7%BD%91%E7%A0%94%E7%A9%B6/%E8%AF%81%E6%8D%AE%E7%90%86%E8%AE%BA%EF%BC%9A%E7%9C%9F%E7%9B%B8%E6%B0%B8%E8%BF%9C%E5%8F%AA%E6%9C%89%E4%B8%80%E4%B8%AA/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count gitment-comments-count" data-xid="/2020/11/01/%E7%94%B5%E7%BD%91%E7%A0%94%E7%A9%B6/%E8%AF%81%E6%8D%AE%E7%90%86%E8%AE%BA%EF%BC%9A%E7%9C%9F%E7%9B%B8%E6%B0%B8%E8%BF%9C%E5%8F%AA%E6%9C%89%E4%B8%80%E4%B8%AA/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="page-pv"><i class="fa fa-file-o"></i>
            <span class="busuanzi-value" id="busuanzi_value_page_pv" ></span>
            </span>
          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  2.9k字
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  10分钟
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="导读"><a href="#导读" class="headerlink" title="导读"></a>导读</h2><p><strong>本教程主要参考来自<a href="https://www.bilibili.com/video/BV1hV41117ca/" target="_blank" rel="noopener">B站的【人工智能教程】5.4 - 证据理论</a>视频，在这之上还加入了其他的博客、论文以及针对个人研究方向的见解。</strong></p>
<a id="more"></a>
<h2 id="侦探剧？不，是统计学！"><a href="#侦探剧？不，是统计学！" class="headerlink" title="侦探剧？不，是统计学！"></a>侦探剧？不，是统计学！</h2><p>证据理论，英文全拼其实不重要，反正也很少人说。但是他还有个别称，叫做“<strong><code>DS</code>理论</strong>”。这个名称在各种论文中出现的频率非常的高，因为是新单词，所以被当作高端词汇滥用了（<em>捂脸</em>）</p>
<p>那么，为什么说这个是<strong>统计学</strong>？</p>
<p>我们先来假设这样一个场景：</p>
<p>有一天，你带着你的小猫娘上街去玩。本来走着好好的，突然小猫娘在一家冰淇淋车面前停下来了。你看着她那期待的眼神和流口水的小嘴巴，实在不忍心拉着她快速离开，于是你顺着她的眼神瞟过去，发现了很大一张菜单，不仅有不知所云的名字，还有非常诱人的效果图。菜单上有三样：仰望星空、蓝海默默和冰の爱恋。</p>
<p>好嘛，买嘛。那么她看中的是哪一个呢？名字完全不知所云，估计直接问也不会有结果。那就猜吧！于是，你的脑海中有这么些个结果：（<em>结果以集合形式呈现</em>）</p>
<ul>
<li>{仰望星空}</li>
<li>{蓝海默默}</li>
<li>{冰の爱恋}</li>
<li>{仰望星空，蓝海默默}</li>
<li>{仰望星空，冰の爱恋}</li>
<li>{蓝海默默，冰の爱恋}</li>
<li>{仰望星空，蓝海默默，冰の爱恋}</li>
<li>{不想吃，被五颜六色的图片吸引了}</li>
</ul>
<p>嗯……接下来就是该选什么了。我作为她的主人，多少还是了解她的喜好的。于是我又开始对每个选项赋予一定的概率：</p>
<ul>
<li>{仰望星空} - 25%</li>
<li>{蓝海默默} - 20%</li>
<li>{冰の爱恋} - 15%</li>
<li>{仰望星空，蓝海默默} - 18%</li>
<li>{仰望星空，冰の爱恋} - 13%</li>
<li>{蓝海默默，冰の爱恋} - 8%</li>
<li>{仰望星空，蓝海默默，冰の爱恋} - 1%</li>
<li>{不想吃，被五颜六色的图片吸引了} - 0%</li>
</ul>
<p>你知道，小猫娘对很神秘的名字是没有任何抵抗力的。所以你觉得“仰望星空”应该是分数最高的；另外，小猫娘还吃不完两个冰淇淋，所以不太可能买两个。难道是今天突然懂事了想给你也买一个？三个那就更离谱了，不想吃是绝对不可能的……呜哇，口水都滴到地上了啊……</p>
<p>怎么办，好像“仰望星空”这一款是最有希望的。算了，点了。你的小猫看起来很开心。</p>
<h2 id="背后的统计学原理"><a href="#背后的统计学原理" class="headerlink" title="背后的统计学原理"></a>背后的统计学原理</h2><p>那么我们来分析一下，我们这么选的真正原因。</p>
<p>小猫娘看到了三个冰淇淋，那就是三个选项。对于这三个选项，我们能够生成一共$2^3=8$种子集，分别是空集$1$个、单元素集合$3$个、双元素集合$3$个、三元素集合$1个$。</p>
<p>为了方便说明，我们记这$8$个选项为$\Omega$，每一个选项都有一个概率值，我们可以将这个选项和概率之间的关系称作一种“映射”，也就是将它视为函数：$p_i = f(x_i)\in(0, 1), x_i\in\Omega$。这个可以说是根据周边什么信息推理出来的或主观或客观的评价概率。在冰淇淋这个情境中，你心中的$8$个选项对应的概率值就是你的<strong>主观</strong>考虑，如果说是像娃娃机一样设定好的概率那就是<strong>客观</strong>的了。当然，这个概率不是说我们想怎么定义就怎么定义的，而是遵循这些条件：</p>
<script type="math/tex; mode=display">\left\{\begin{matrix}
  f(\phi) &= &0 &\cdots &❶\\
  \sum_{x_i\in\Omega}f(x_i) &= &1 &\cdots &❷
\end{matrix}\right.</script><p>其实总接下来就是两项：</p>
<ul>
<li>空集无概率</li>
<li>其余和为$1$</li>
</ul>
<p>如果同时满足这两个条件，$f(x)$才能够被称作<strong>概率分配函数</strong>，因为恰好完全分配了。</p>
<p>当然，我们这里的$x$实际上表示一个对象，也就是说，$x$包含了这个对象所有的条件集。有时候我们也写为矩阵形式$\sum_{A\subseteq\Omega}f(A)=1$。而其中的$f(A)$也就是当前环境下对假设集$A$的信任程度。也就是你认为$A$中的条件是不是真的能够成立，成立的概率应该是多少。</p>
<h2 id="证据成立概率的上限和下限"><a href="#证据成立概率的上限和下限" class="headerlink" title="证据成立概率的上限和下限"></a>证据成立概率的上限和下限</h2><p>到这里，相信大家应该对<code>DS</code>理论有一定的了解了。那么接下来就是纯数学了。</p>
<p>我们刚刚提到$x\in\Omega$，其中如果还加上一个条件：$x$的取值相互独立，那么$\Omega$的所有子集就可以称作幂集，记为$2^\Omega$。也就是像给小猫娘麦冰淇淋一样，只能是$8$种相互独立的可能；而如果说是两只双胞胎猫娘，姐姐选了之后妹妹选同样的冰淇淋概率非常高，这就是对另一种可能产生了影响，也就不相互独立。</p>
<p>如果说，$A$代表单元素集合，那么$f(A)$就是对于假设条件$A$的精确信任度；如果$A$代表多元素集合，$f(A)$则仅代表整体信任度，每个假设条件的信任度并不精确，若$A=\Omega$也是同样的。对于这一点，我们用数学语言表示就是：</p>
<script type="math/tex; mode=display">对于任意的A\subseteq\Omega，记B\subseteq{A}，有Bel(A)=\sum_{B\subseteq A}f(B)</script><p>听起来绕口？无所谓啦。总之这句话的意思就是：当$A$为多元素集合的时候，记$Bel(A)$为$A$中<strong>所有子集</strong>的精确信任度之和。这个$Bel(A)$也可以称作<strong>下限函数</strong>。</p>
<p>除了这些，还有<strong>似然函数</strong>，同样是在集合$A$是幂集的前提下，具体表示为：</p>
<script type="math/tex; mode=display">对于\forall A\subseteq\Omega，s.t.\rightarrow Pl(A)=1-Bel(\bar{A})，其中\bar{A}=\Omega-A</script><p>可以看到，这里多了一个<strong>取反</strong>的操作，所以这里讨论的也就不是集合$A$的精确信任度，而是$A$的<strong>非假信任度</strong>。同样的，相对于被称为<strong>下限函数</strong>的$Bel(A)$，$Pl(A)$也就被称为<strong>上限函数</strong>或者<strong>不可驳斥函数</strong>。听起来很让人摸不着头脑不是么？明明都有了真实的精确信任度，偏偏还要弄个非假的信任度，这不是折腾？</p>
<p>只能说，这是另一种求法，可以用在完全没有办法或者说靠人计算实在太麻烦的情况下。比如，你想带着你家里的所有猫娘出去逛街，但是每只猫娘的性格都不太一样，所以需要确定一个地点<strong>至少有一只猫娘愿意去</strong>。估计算到一半你就觉得太难了。所以改变思路：<strong>没有猫娘愿意去</strong>。听起来很不错？但是，还是有一个小小的弊端。因为我们用这个方法求出来的是<strong>非假信任度</strong>，也就是肯定为真的部分加上只能保证不假的部分的和。虽然绝对可以保证不是假的，但是有多少能确定是真的呢？如果精确部分很难算的话，这就真的一点都不知道了，完全决定不了该带猫娘们去哪。</p>
<p>那么<strong>上下限和现实感觉有什么联系</strong>？只能这么说：当上限$Pl(A)=1$，下限$Bel(A)=0$的时候，我们就会在现实生活中觉得：<strong>我们对这件事一无所知</strong>，因为<strong>任何事</strong>发生的概率都是$[0,1]$。</p>
<p>那么上限和下限有什么关系吗？从<strong>数学</strong>上来说，有的。信任函数和似然函数有以下几点性质：</p>
<script type="math/tex; mode=display">\left\{\begin{matrix}
  Bel(\phi) &= &Pl(\phi) &= &0 \\
  Bel(\Omega) &= &Pl(\Omega) &= &1\\
\end{matrix}\right.</script><script type="math/tex; mode=display">若有A\subseteq B，则有\left\{\begin{matrix}
  Bel(A) &\leq &Bel(B)\\
  Pl(A) &\leq &Pl(B)
\end{matrix}\right.</script><script type="math/tex; mode=display">对于\forall A\subseteq\Omega，s.t.：\left\{\begin{matrix}
  Pl(A) &\ge &Bel(A)\\
  Pl(A)+Pl(\bar{A}) &\ge &1\\
  Bel(A)+Bel(\bar{A}) &\le &1
\end{matrix}\right.</script><h2 id="证据组合"><a href="#证据组合" class="headerlink" title="证据组合"></a>证据组合</h2><p>单个证据基本上就是这些了。接下来难度升级：多个证据组合。</p>
<p>对于两个不同的概率分配函数$f(x)$和$g(x)$，正交和$h(x)=f(x)\bigoplus g(x)$满足：</p>
<script type="math/tex; mode=display">\left\{\begin{matrix}
  h(\phi) &= &0\\
  h(A) &= &\frac{\sum_{x\cap y=A}f(x)\times g(y)}{1-\sum_{x\cap y=\phi}f(x)\times g(y)} &= &\frac{\sum_{x\cap y=A}f(x)\times g(y)}{\sum_{x\cap y\neq\phi}f(x)\times g(x)}
\end{matrix}\right.</script><p>看起来头大？只能死记硬背了。我们唯一能做的就是把$h(A)$的分母提取出来：</p>
<script type="math/tex; mode=display">K=1-\sum_{x\cap y=\phi}f(x)\times g(y)=\sum_{x\cap y\neq\phi}f(x)\times g(x)</script><p>对于这个$K$，我们还有一个小小的判定：</p>
<script type="math/tex; mode=display">\left\{\begin{matrix}
  if &K &\neq &0，then：&正交和h(x)也是概率分布函数\\
  if &K &= &0，then：&h(x)不存在，f(x)与g(x)矛盾
\end{matrix}\right.</script><p>这个在多个条件下的混合判定更有用。</p>
<p>拿视频中的例子说明吧。你现在正流鼻涕，眼睛还有点点红。于是你问了你的医生朋友，说道：</p>
<ul>
<li>如果流鼻涕，九成会是感冒但不是过敏性鼻炎；</li>
<li>如果眼睛红了，八成会是过敏性鼻炎而不是感冒。</li>
</ul>
<p>这就是<strong>规则</strong>。那么你的情况就是这样的，也就是<strong>样本空间</strong>：</p>
<ul>
<li>{没病} - 也就是我们所说的空集$\phi$</li>
<li>{感冒}</li>
<li>{过敏性鼻炎}</li>
<li>{又是感冒又是过敏性鼻炎}</li>
</ul>
<p>于是，你将每一块都拉出来分析，最终发现你<strong>就是感冒</strong>，<strong>不是过敏性鼻炎</strong>。</p>
<h2 id="证据理论在电网中的应用"><a href="#证据理论在电网中的应用" class="headerlink" title="证据理论在电网中的应用"></a>证据理论在电网中的应用</h2><p>说了这么多，就该说说实际中的应用了吧。</p>
<p>说白了，证据理论依然是使用非常多的机器学习算法对海量的用户数据进行分析，并作出分类与预测这两个动作，本质上依然是一种机器学习。</p>
<p>实际中，我们可以使用证据理论预判哪条路在什么时候容易堵车、哪些设备在经过怎么样的使用之后会在什么时候损毁，甚至还能够进行心理预测、军事战场动向、信息安全主动防御等等。如果你曾经看过我的<a href="/2020/10/28/电网研究/态势感知：我预判了你的预判！">态势感知</a>，你会发现这些应用方向和态势感知的内容<strong>重复率相当高</strong>。实际上态势感知只是一个方向，而<code>DS</code>理论则是一个<strong>相对比较实际的方法</strong>来感知事物的态势。</p>
<p>那么在电网中呢？我们可以使用证据理论来预判在什么季节哪个小区的用电非常高、哪个片区的故障概率非常高。<strong>在发生停电之前</strong>，我们就能够使用这些预测信息来给用户发送预警，防止用户在洗热水澡、写文档、电压力锅煲羊肉汤的时候突然断电。当然，在信息推送的时候还是要保证<strong>概率下限都足够高</strong>的时候才推送，否则很多误报就会像狼来了一样，让用户丧失信心。</p>
<p>是不是有点能理解了呢？</p>

      
    </div>
    
    
    

    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div>代码滞销，救救码农</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/pay/wechatpay.png" alt="sakebow 微信支付"/>
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/pay/alipay.jpg" alt="sakebow 支付宝"/>
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    
      <div>
        <ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者：</strong>
    sakebow
  </li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="https://sakebow.github.io/2020/11/01/%E7%94%B5%E7%BD%91%E7%A0%94%E7%A9%B6/%E8%AF%81%E6%8D%AE%E7%90%86%E8%AE%BA%EF%BC%9A%E7%9C%9F%E7%9B%B8%E6%B0%B8%E8%BF%9C%E5%8F%AA%E6%9C%89%E4%B8%80%E4%B8%AA/" title="证据理论：真相永远只有一个">https://sakebow.github.io/2020/11/01/%E7%94%B5%E7%BD%91%E7%A0%94%E7%A9%B6/%E8%AF%81%E6%8D%AE%E7%90%86%E8%AE%BA%EF%BC%9A%E7%9C%9F%E7%9B%B8%E6%B0%B8%E8%BF%9C%E5%8F%AA%E6%9C%89%E4%B8%80%E4%B8%AA/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>
    本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/3.0/" rel="external nofollow" target="_blank">CC BY-NC-SA 3.0</a> 许可协议。转载请注明出处！
  </li>
</ul>

      </div>
    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/%E8%AE%BA%E6%96%87%E7%A0%94%E7%A9%B6/" rel="tag"> <i class="fa fa-tag"></i> 论文研究</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2020/10/28/%E7%94%B5%E7%BD%91%E7%A0%94%E7%A9%B6/%E6%80%81%E5%8A%BF%E6%84%9F%E7%9F%A5%EF%BC%9A%E6%88%91%E9%A2%84%E5%88%A4%E4%BA%86%E4%BD%A0%E7%9A%84%E9%A2%84%E5%88%A4%EF%BC%81/" rel="next" title="态势感知：我预判了你的预判！">
                <i class="fa fa-chevron-left"></i> 态势感知：我预判了你的预判！
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2020/11/01/python/Django/Python%E7%9A%84%E6%9C%80%E7%81%AB%E6%A1%86%E6%9E%B6%EF%BC%9ADjango/" rel="prev" title="Python的最火框架：Django">
                Python的最火框架：Django <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  
    <div class="comments" id="comments">
      
        <div onclick="showGitment()" id="gitment-display-button">显示 Gitment 评论</div>
        <div id="gitment-container" style="display:none"></div>
      
    </div>
	<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
    <script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
	<script>
      var gitment = new Gitment({
        id: '<%= page.date %>',
        owner: 'sakebow',
        repo: 'git@github.com:sakebow/sakebow.github.io.git',
        oauth: {
          client_id: '5c74c5e1b67e5a5adbdf',
          client_secret: '0d352353407a32cee695d8ac619108e725919c57',
        },
      });
      gitment.render('gitment-container');
    </script>

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/images/icon/UN.png"
                alt="sakebow" />
            
              <p class="site-author-name" itemprop="name">sakebow</p>
              <p class="site-description motion-element" itemprop="description">哪怕是狗也不想随随便便放弃看到的骨头</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/%7C%7C%20archive">
              
                  <span class="site-state-item-count">70</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">18</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">21</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/sakebow" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="mailto:sakebowljx@gmail.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://plus.google.com/sakebow" target="_blank" title="Google">
                      
                        <i class="fa fa-fw fa-google"></i>Google</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://twitter.com/sakebow" target="_blank" title="Twitter">
                      
                        <i class="fa fa-fw fa-twitter"></i>Twitter</a>
                  </span>
                
            </div>
          

          
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-block">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-link"></i>
                Links
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="https://github.com/sakebow" title="Sakebow的GitHub" target="_blank">Sakebow的GitHub</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.appgofast.com" title="我喜欢的VPN" target="_blank">我喜欢的VPN</a>
                  </li>
                
              </ul>
            </div>
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#导读"><span class="nav-number">1.</span> <span class="nav-text">导读</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#侦探剧？不，是统计学！"><span class="nav-number">2.</span> <span class="nav-text">侦探剧？不，是统计学！</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#背后的统计学原理"><span class="nav-number">3.</span> <span class="nav-text">背后的统计学原理</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#证据成立概率的上限和下限"><span class="nav-number">4.</span> <span class="nav-text">证据成立概率的上限和下限</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#证据组合"><span class="nav-number">5.</span> <span class="nav-text">证据组合</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#证据理论在电网中的应用"><span class="nav-number">6.</span> <span class="nav-text">证据理论在电网中的应用</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      
        <div class="back-to-top">
          <i class="fa fa-arrow-up"></i>
          
            <span id="scrollpercent"><span>0</span>%</span>
          
        </div>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Sakebow</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Gemini</a> v5.1.4</div>




        
<div class="busuanzi-count">
  <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv">
      <i class="fa fa-user"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
      
    </span>
  

  
    <span class="site-pv">
      <i class="fa fa-eye"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
      
    </span>
  
</div>








        
      </div>
    </footer>

    

    
      <div id="needsharebutton-float">
        <span class="btn">
          <i class="fa fa-share-alt" aria-hidden="true"></i>
        </span>
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/lib/canvas-nest/canvas-nest.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  







<!-- LOCAL: You can save these files to your site and update links -->
    
        
        <link rel="stylesheet" href="https://aimingoo.github.io/gitmint/style/default.css">
        <script src="https://aimingoo.github.io/gitmint/dist/gitmint.browser.js"></script>
    
<!-- END LOCAL -->

    

    
      <script type="text/javascript">
      function renderGitment(){
        var gitment = new Gitmint({
            id: window.location.pathname, 
            owner: 'sakebow',
            repo: 'git@github.com:sakebow/sakebow.github.io.git',
            
            lang: "" || navigator.language || navigator.systemLanguage || navigator.userLanguage,
            
            oauth: {
            
            
                client_secret: '0d352353407a32cee695d8ac619108e725919c57',
            
                client_id: '5c74c5e1b67e5a5adbdf'
            }});
        gitment.render('gitment-container');
      }

      
      function showGitment(){
        document.getElementById("gitment-display-button").style.display = "none";
        document.getElementById("gitment-container").style.display = "block";
        renderGitment();
      }
      
      </script>
    







  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  

  

  
  
  
  <link rel="stylesheet" href="/lib/needsharebutton/needsharebutton.css">

  
  
  <script src="/lib/needsharebutton/needsharebutton.js"></script>

  <script>
    
    
      flOptions = {};
      
          flOptions.iconStyle = "box";
      
          flOptions.boxForm = "horizontal";
      
          flOptions.position = "middleRight";
      
          flOptions.networks = "Weibo,Douban,QQZone,Twitter,Facebook";
      
      new needShareButton('#needsharebutton-float', flOptions);
    
  </script>

  

  
  
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      });
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      });
    </script>
    <script type="text/javascript" src="https://cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
  


  

  
 
</body>
</html>
